/**
 * 
 */
package org.cuatrovientos.erp.model;


import javax.validation.constraints.Min;
import javax.validation.constraints.Size;

/**
 * @author eneko_lana
 *
 */
public class Stock {
	
	private int id;
	
	@Min(value=1,message="{shipment.rack.error}")
	private int rack;
	
	@Size(min=1,max=100,message="{shipment.description.error}")
	private String description;

	@Min(value=1,message="{shipment.qty.error}")
	private int qty;
	
	@Min(value=1,message="{shipment.idproduct.error}")
	private int idproduct;
	
	public Stock () {
		
	}
	
	public Stock(int id, int rack, String description,
			int qty, int idproduct) {
		this.id = id;
		this.rack = rack;
		this.description = description;
		
		this.qty = qty;
		this.idproduct = idproduct;
	}

	
	

	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public int getRack() {
		return rack;
	}


	public void setRack(int rack) {
		this.rack = rack;
	}


	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}


	public int getQty() {
		return qty;
	}


	public void setQty(int qty) {
		this.qty = qty;
	}


	public int getIdproduct() {
		return idproduct;
	}


	public void setIdproduct(int idproduct) {
		this.idproduct = idproduct;
	}

	@Override
	public String toString() {
		return "Stock [id=" + id + ", rack=" + rack + ", description="
				+ description + ", qty=" + qty + ", idproduct=" + idproduct
				+ "]";
	}


	

}
